#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <stdlib.h>
int main (int argc ,char **argv)
{
  int shm_id;
  if (argc != 2)
  {
    printf("usage:shm_open <pathname>\n");
    exit(1);
  }
  shm_id = shm_open(argv[1],O_RDWR|O_CREAT,0777);
  printf("shmid:%d\n",shm_id);
  shm_unlink(argv[1]);
  return 0;
  
}
